package com.pgybook.db.entity.mapper;

import org.springframework.stereotype.Repository;
import com.pgybook.db.entity.domain.PublicWeibo;
import com.pgybook.db.entity.domain.PublicWeiboEx;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

@Repository
public interface PublicWeiboMapper {
    int countByExample(PublicWeiboEx example);

    int deleteByExample(PublicWeiboEx example);

    @Insert({
            "insert into publicweibo (PUBLICWEIBOID, CONTENT, ",
            "CRTTIME, FORWARDEDNUM, ",
            "REWARDCOINNUM, VALIDDATETIME, ",
            "UPDTIME, REWARDCUSTOMERNUM)",
            "values (#{publicweiboid,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, ",
            "#{crttime,jdbcType=TIMESTAMP}, #{forwardednum,jdbcType=INTEGER}, ",
            "#{rewardcoinnum,jdbcType=BIGINT}, #{validdatetime,jdbcType=TIMESTAMP}, ",
            "#{updtime,jdbcType=TIMESTAMP}, #{rewardcustomernum,jdbcType=INTEGER})"
    })
    int insert(PublicWeibo record);

    int insertSelective(PublicWeibo record);

    List<PublicWeibo> selectByExample(PublicWeiboEx example);

    int updateByExampleSelective(@Param("record") PublicWeibo record, @Param("example") PublicWeiboEx example);

    int updateByExample(@Param("record") PublicWeibo record, @Param("example") PublicWeiboEx example);
}
